Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

smartcard c#

141 views
Skip to first unread message

pp

unread,
Feb 16, 2003, 8:20:44 PM2/16/03
to
Hello all,

Can anyone point me to any resources or sample code regarding SmartCard
programming in c# or vb.net ?

Thanks.
pp


Greg Ewing [MVP]

unread,
Feb 16, 2003, 9:45:00 PM2/16/03
to
pp, you will have to use P/Invoke or a third party's tools to do SmartCard
programming. Have you done it in C++ or any other language before?

One 3rd party is
http://www.hiveminded.com/whitepapers/Smartcard.NET%20-%20A%20Technology%20Overview.pdf

Another good resource includes sites like http://www.opencard.org/

If you have more specific questions feel free to follow-up.

--
Greg Ewing [MVP]
http://www.claritycon.com/

"pp" <ppa...@bigpond.net.au> wrote in message
news:MNW3a.9472$863....@news-server.bigpond.net.au...

pp

unread,
Feb 17, 2003, 5:35:20 AM2/17/03
to
Hello.
Thanks for replying.

I have a solution in c++ called TestPCSC. At the moment it just utilises
some of the
methods such as SCardEstablishContext, SCardReleaseContext, SCardListReaders
and SCardConnect.

I need to perform other functions such as SCardGetProviderId (gets the
unique id of the card as a guid) and also be able to write to the card.

I really am not to sure how I can do this JUST from looking at how the other
methods have been implemented. I have had a look at the MSDN documentation,
but this tends to be quite brief just listing the input and output
parameters for each method.

Is there any additional support for c++ ?

Do you know much about the SmartCard.Net framework and how to get hold of it
?

Thanks, appreciate you r help.

pp

"Greg Ewing [MVP]" <gewing@_NO_SPAM_claritycon.com> wrote in message
news:#goHI6i1CHA.1912@TK2MSFTNGP09...

Greg Ewing [MVP]

unread,
Feb 17, 2003, 9:46:11 AM2/17/03
to
pp, you can use the P/Invoke services to interop with the winscard.lib where
all of those functions are found. Here's some info on P/Invoke types which
should be helpful.

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconplatforminvokedatatypes.asp

[DllImport("winscard.dll")]
static extern int SCardEstablishContext(uint dwScope,
IntPtr pvReserved1,
IntPtr pvReserved2,
out IntPtr phContext);

Pass in IntPtr.Zero as null for the second and third parameter. All of the
other functions will have similar declarations, any differences should be
pretty clear from the MSDN article above.

I don't know all that much about smartcard development although I'm sure you
should be able to find samples at www.google.com or groups.google.com.

--
Greg Ewing [MVP]
http://www.claritycon.com/


"pp" <ppa...@bigpond.net.au> wrote in message

news:IV24a.10893$863....@news-server.bigpond.net.au...

0 new messages